# Makefile for SIL library top directory
#  
#   very top SIL directory

##################### LIBRARIES ########################
#
# DIRS:  
# This is an ordered list
# Put only the directories that build object files in the list

# make all targets
DIRS = src

ifndef PREFIX
    PREFIX=/usr
endif

# copy modules to /usr/share/yuma
TOP_INSTALL=$(DESTDIR)$(PREFIX)/share/yuma
INSTALL_TARGET=$(TOP_INSTALL)/modules

#################### PLATFORM DEFINITIONS ############

all: silall

################################ MAKE RULES #################################
#

clean: silclean

superclean: silsuperclean

install: silinstall yanginstall

silall:
	for dir in $(DIRS); do\
	  cd $$dir && $(MAKE) && cd ..;\
        done

silclean:
	for dir in $(DIRS); do\
	  cd $$dir && $(MAKE) clean && cd ..;\
        done

silsuperclean:
	for dir in $(DIRS); do\
	  cd $$dir && $(MAKE) superclean && cd ..;\
        done

silinstall:
	for dir in $(DIRS); do\
          cd $$dir && $(MAKE) install && cd ..;\
        done

yanginstall:
	mkdir -p $(INSTALL_TARGET)
	cp *.yang $(INSTALL_TARGET)


.PHONY: all clean superclean install \
	silall silclean silsuperclean silinstall 


# prevent the make program from choking on all the symbols
# that get generated from autogenerated make rules
.NOEXPORT:



